﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.internals.publics.courseware.Edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>课件信息</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript">
    function CheckForm() {
      var courseid = document.getElementById("CourseSlt").value;
      var serialNumber = document.getElementById("SerialNumberTxt").value;

      if (courseid == "-1" || serialNumber == "" || isNaN(serialNumber)) {
        alert("信息填写错误");
        return false;
      } else {
        return true;
      }
    }
  </script>
</head>
<body>
  <form id="form1" method="post" action="" enctype="multipart/form-data">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;课件信息</div>
      </div>
      <div class="spe_line_2"></div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>课程选择：</div>
        <div class="fl dis_r">
          <% if (courseList != null && courseList.Count > 0) { %>
          <select id="CourseSlt" name="CourseSlt">
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in courseList) { %>
              <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          </select>
          <% } %>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>页码：</div>
        <div class="fl dis_r"><input type="text" id="SerialNumberTxt" name="SerialNumberTxt" value="<%=model.SerialNumber %>" /><input type="hidden" id="OriginalSerialNumberTxt" name="OriginalSerialNumberTxt" value="<%=model.SerialNumber %>" /></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">文字内容：</div>
        <div class="fl"><textarea id="ContentTxt" name="ContentTxt" style="width:400px; height:200px;"><%=model.Content %></textarea></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">图片：</div>
        <div class="fl"><input type="file" id="PicFileUpload" name="PicFileUpload" style="width:400px; height:18px;" /></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">声音：</div>
        <div class="fl"><input type="file" id="SoundFileUpload" name="SoundFileUpload" style="width:400px; height:18px;" /></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">视频：</div>
        <div class="fl"><input type="file" id="VideoFileUpload" name="VideoFileUpload" style="width:400px; height:18px;" /></div>
      </div>
    </div>
    <div class="block">
      <div style="width:350px; margin-top:20px; text-align:center;">
        <input type="image" src="/images/btn/confirm.gif" style="width:52px; height:22px;" onclick="return CheckForm();" />
        <% if (act == "u") { %>
        &nbsp;&nbsp;<a href="/internals/publics/courseware/List.aspx"><img alt="" src="/images/btn/back.gif" /></a>
        <% } %>
      </div>
    </div>
      <input type="hidden" id="act" name="act" value="<%=act %>" />
      <input type="hidden" id="id" name="id" value="<%=id %>" />
      <input type="hidden" id="cid" name="cid" value="<%=r_courseid %>" />
      <input type="hidden" id="se" name="se" value="<%=se %>" />
      <input type="hidden" id="o_p_p" name="o_p_p" value="<%=model.ImgUrl %>" />
      <input type="hidden" id="o_s_p" name="o_s_p" value="<%=model.SoundUrl %>" />
      <input type="hidden" id="o_v_p" name="o_v_p" value="<%=model.VideoUrl %>" />
      
      <% if (act == "n") { %>
    <script type="text/javascript">
      document.getElementById("CourseSlt").value = '<%=r_courseid %>';
      document.getElementById("SerialNumberTxt").value = '<%=se %>';
    </script>
    <% } else { %>
    <script type="text/javascript">
      document.getElementById("CourseSlt").value = '<%=model.CourseID %>';
    </script>
    <% } %>
  </form>
</body>
</html>
